<?php
    $this->title = "Редактирование Пользователя";
    $this->headTitle($this->title);
   // echo $this->form ;
?>

<form method="post" action="<?php echo $this->url(array('usersId' => $this->fp->id),'admineditusers',true);?>" id="registration-form">

    <fieldset>
        <legend>Редактирование пользователя</legend>
        <div class="error" >
            Одно или несколько полей заполнены неверно. Проверьте, пожалуйста, 
            поля с ошибками и отправьте форму ещё раз.
        </div>
     <div class="row" id="form_username_container">
          <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_login">Логин:</label></span>
          <span class="td4" style="padding: 5px;"> <input type="text" id="form_login"
            name="login" value="<?php echo $this->fp->login ?>" />
          </span>
        </div>
        
        <div class="row" id="form_password_container">
              <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_password">Пароль:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="password" id="form_password"
                   name="password" value="<?php echo $this->fp->password ?>" />
           </span>
        </div>
        
        <div class="row" id="form_password_again_container">
                 <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_password_again">Подтвердите пароль:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="password" id="form_password_again"
                   name="password_again" value="<?php echo $this->fp->password_again ?>" />
            </span>
        </div>

        <div class="row" id="form_first_name_container">
                 <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_email">E-mail:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="text" id="form_email"
                   name="email" value="<?php echo $this->fp->email ?>" />
           </span>
        </div>
         
        <div class="row" id="form_real_adress_container">
                 <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_first_name">Имя:</label></span>
            <span class="td4" style="padding: 5px;">  <input type="text" id="form_first_name"
                   name="first_name" value="<?php echo $this->fp->first_name ?>" />
         </span>
        </div>
        
        <div class="row" id="form_company_phone_container">
                <span class="td4" style="width:200px;padding-top: 5px;">  <label for="form_last_name">Фамилия:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="text" id="form_last_name"
                   name="last_name" value="<?php echo $this->fp->last_name ?>" />
           </span>
        </div>
        
        <div class="row" id="form_code_container">
                <span class="td4" style="width:200px;padding-top: 5px;">  <label for="form_gender">Пол:</label></span>
            <span class="td4" style="padding: 5px;">     
                <input type="checkbox" id="form_gender" value="1" name="gender"<?if ($this->fp->gender=='1') {?> checked="checked"<?}?> />М<br>
                <input type="checkbox" id="form_gender" value="2" name="gender"<?if ($this->fp->gender=='2') {?> checked="checked"<?}?> />Ж
           </span>
        </div>
        
       
        
        <div class="row" id="form_phone_container">
                <span class="td4" style="width:200px;padding-top: 5px;">  <label for="form_ban">Бан:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="checkbox" id="form_ban"
                   name="ban" <?if ($this->fp->ban) {?> checked="checked"<?}?> /></span>
        </div>
        <div class="row" id="form_phone_container">
                <span class="td4" style="width:200px;padding-top: 5px;">  <label for="form_activated">Одобрен:</label></span>
             <span class="td4" style="padding: 5px;"> <input type="checkbox" id="form_activated"
                   name="activated"<?if ($this->fp->activated) {?> checked="checked"<?}?> /></span>
        </div>
        
        <div class="row" id="form_phone_container">
                 <span class="td4" style="width:200px;padding-top: 5px;"> <label for="form_isApproved">Уровень доступа:</label></span>
           <span class="td4" style="padding: 5px;">   <select name="role">
                <option value="member"<?if ($this->fp->role == 'member') {?> selected="selected"<?}?>>Пользователь</option>
                <option value="admin"<?if ($this->fp->role == 'admin') {?> selected="selected"<?}?>>Администратор</option>
               
                <option value="seo"<?if ($this->fp->role == 'seo') {?> selected="selected"<?}?>>SEO</option>
                <option value="globaladmin"<?if ($this->fp->role == 'globaladmin') {?> selected="selected"<?}?>>Глобальный администратор</option>
               
            </select></span>
        </div>

        <div class="submit">
            <input type="submit" value="Добавить" />
        </div>
    </fieldset>
</form>